import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'login',
    component: () => import('../views/login/index.vue'),
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/home/HomeView.vue'),
    children: [
      {
        path: '/welcome',
        name: 'welcome',
        component: () => import('../views/welcome/welcomeView.vue'),
      },
      {
        path: '/ordering',
        name: 'ordering',
        component: () => import('../views/ordering/OrderingView.vue'),
      },
      {
        path: '/first',
        name: 'first',
        component: () => import('../views/subject/First.vue'),
      },
      {
        path: '/items',
        name: 'items',
        component: () => import('../views/subject/Items.vue'),
      },
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
